<template>
  <div class="login">
    <AlNavBar @onClickLeft="back" title="注册" :show-go-home="false"></AlNavBar>
    <div class="login-main">
      <h4></h4>
      <div class="login-input">
        <van-form @submit="onSubmit" ref="loginForm">
          <!-- 邮箱 -->
          <van-field
              v-model="username"
              name="username"
              placeholder="邮箱登陆"

              :rules="[{ pattern: /^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/, message: '请输入正确内容' }]"
          >
            <template #left-icon><i class="iconfont icon-mail"></i></template>
          </van-field>
          <!-- 验证码 -->
          <van-field
              v-model="password"
              name="password"
              type="password"
              placeholder="请输入密码"
              :rules="[{ required: true, message: '请输入正确内容' }]"
          >
            <template #left-icon>
              <i class="iconfont icon-password"></i>
            </template>
            绑定是否弹出
          </van-field>
          <p class="link">
            登录即同意<span>《用户使用协议》</span>和<span>《隐私协议》</span>
          </p>
          <van-button class="btn" size="large" type="info">登录</van-button>
        </van-form>
      </div>
    </div>
  </div>
</template>

<script>
import AlNavBar from "@/components/AlNavBar";

export default {
  name: "register",
  components: {AlNavBar},
  data() {
    return {
      username: '',
      password: ''
    }
  },

}
</script>

<style lang="less" >

</style>